package lumis.service.comment;

import lumis.doui.processaction.ProcessActionHandler;
import lumis.doui.source.Source;
import lumis.portal.PortalException;
import lumis.portal.manager.ManagerFactory;

/**
 * ProcessActionHandler that sets status attribute in the request.
 *
 * @version $Revision: 8732 $ $Date: 2008-01-08 12:00:58 -0200 (Tue, 08 Jan 2008) $
 * @since 4.0.10
 */
public class SetMetaDataInfoProcessActionHandler extends ProcessActionHandler<Source>
{
	public void processAction() throws PortalException
	{
		String moderated = ManagerFactory.getServiceInstanceManager().getCustomProperty(sessionConfig, douiContext.getRequest().getServiceInstanceConfig().getId(), "moderate", transaction);
		if(!"1".equals(moderated))
			douiContext.getRequest().setAttribute("status", "1");
		else
			douiContext.getRequest().setAttribute("status", "0");
	}
}
